#include <stdio.h>
#include <string.h>
int strtok1(char* p);
int strtok2(char* p);
int main(int argc, char** argv) {
  char p[100] = {0};
  strtok1(p);
  printf("xx%s\n", p);
  char a[128] = {0};
  snprintf(a, 128,"%s","220 LIU-PC ESMTP");
  strtok2(a);
  return 0;
}
int strtok1(char* p) {
  char str[] = "i_love_you";
  char* tmp = NULL;
  strtok_r(str, "_", &tmp);
  printf("%s\n", tmp);
  char* tmp1 = NULL;
  strtok_r(tmp, "_", &tmp1);
  printf("%s\n", tmp1);
  strcpy(p, tmp);
  return 0;
}

int strtok2(char* p)
{
  char* tmp = NULL;
  strtok_r(p, " ", &tmp);
  printf("%s\n", tmp);
  char* tmp1 = NULL;
  strtok_r(tmp, " ", &tmp1);
  printf("%s\n", tmp);
  printf("%s\n", tmp1);
  return 0;
}
